/**
 * 所有版权归 广西梧州 陈锦韬 所有
 *
 * @Title: RewriteAccessDenyFilter
 * @Package com.rx.zuul.filter
 * @Description: 自定义校验错误过滤
 * @author: 陈锦韬
 * @date: 2021\6\29 0029
 * @version V1.0
 * @Copyright: 2021 陈锦韬  All rights reserved.
 */
package com.rx.zuul.filter;

import com.rx.core.enm.RX_LOG_MODE;
import com.rx.core.util.EmptyChecker;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Lazy;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.web.access.AccessDeniedHandler;
import org.springframework.stereotype.Component;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author: Administrator
 * @Description: 自定义校验错误过滤
 * @date: 2021\6\29 0029
 */
@Component
@Lazy
@Slf4j
public class RewriteAccessDenyFilter implements AccessDeniedHandler {
    @Override
    public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException accessDeniedException) throws IOException, ServletException {
        log.info(RX_LOG_MODE.DEFAULT.getFormat(),"security error");

    }
}
